package com.small.xx.ai.apidoc.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * API文档配置属性类
 */
@ConfigurationProperties(prefix = "app.api-doc")
public class ApiDocProperties {
    
    /**
     * 服务器配置
     */
    private Server server = new Server();
    
    /**
     * Swagger配置
     */
    private Swagger swagger = new Swagger();
    
    // Getters and Setters
    
    public Server getServer() {
        return server;
    }
    
    public void setServer(Server server) {
        this.server = server;
    }
    
    public Swagger getSwagger() {
        return swagger;
    }
    
    public void setSwagger(Swagger swagger) {
        this.swagger = swagger;
    }
    
    /**
     * 服务器配置
     */
    public static class Server {
        /**
         * 服务器端口
         */
        private int port = 8083;
        
        /**
         * 服务器地址
         */
        private String host = "localhost";
        
        // Getters and Setters
        
        public int getPort() {
            return port;
        }
        
        public void setPort(int port) {
            this.port = port;
        }
        
        public String getHost() {
            return host;
        }
        
        public void setHost(String host) {
            this.host = host;
        }
    }
    
    /**
     * Swagger配置
     */
    public static class Swagger {
        /**
         * 是否启用Swagger
         */
        private boolean enabled = true;
        
        /**
         * 标题
         */
        private String title = "API文档管理系统";
        
        /**
         * 描述
         */
        private String description = "基于Spring Boot的在线API文档管理系统";
        
        /**
         * 版本
         */
        private String version = "1.0.0";
        
        /**
         * 许可证
         */
        private String license = "Apache 2.0";
        
        /**
         * 许可证URL
         */
        private String licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0";
        
        // Getters and Setters
        
        public boolean isEnabled() {
            return enabled;
        }
        
        public void setEnabled(boolean enabled) {
            this.enabled = enabled;
        }
        
        public String getTitle() {
            return title;
        }
        
        public void setTitle(String title) {
            this.title = title;
        }
        
        public String getDescription() {
            return description;
        }
        
        public void setDescription(String description) {
            this.description = description;
        }
        
        public String getVersion() {
            return version;
        }
        
        public void setVersion(String version) {
            this.version = version;
        }
        
        public String getLicense() {
            return license;
        }
        
        public void setLicense(String license) {
            this.license = license;
        }
        
        public String getLicenseUrl() {
            return licenseUrl;
        }
        
        public void setLicenseUrl(String licenseUrl) {
            this.licenseUrl = licenseUrl;
        }
    }
}